package com.xdb.sqlparser.dialect.oracle.ast.statement;

import com.xdb.sqlparser.ast.statement.SQLAlterTableStatement;
import com.xdb.sqlparser.dialect.oracle.visitor.OracleASTVisitor;
import com.xdb.sqlparser.visitor.SQLAstVisitor;
import com.xdb.util.JDBCConstants;

public class OracleAlterTableStatement extends SQLAlterTableStatement implements OracleDDLStatement {

	private boolean updateGlobalIndexes = false;
	private boolean invalidateGlobalIndexes = false;

	public OracleAlterTableStatement() {
		super(JDBCConstants.ORACLE);
	}

	protected void accept0(SQLAstVisitor visitor) {
		accept0((OracleASTVisitor) visitor);
	}

	@Override
	public void accept0(OracleASTVisitor visitor) {
		if (visitor.visit(this)) {
			acceptChild(visitor, getTableSource());
			acceptChild(visitor, getItems());
		}
		visitor.endVisit(this);
	}

	public boolean isUpdateGlobalIndexes() {
		return updateGlobalIndexes;
	}

	public void setUpdateGlobalIndexes(boolean updateGlobalIndexes) {
		this.updateGlobalIndexes = updateGlobalIndexes;
	}

	public boolean isInvalidateGlobalIndexes() {
		return invalidateGlobalIndexes;
	}

	public void setInvalidateGlobalIndexes(boolean invalidateGlobalIndexes) {
		this.invalidateGlobalIndexes = invalidateGlobalIndexes;
	}
}
